const path = require('path');

module.exports = {
  devServer: {
    proxy: {
      '/api': {
        target: 'http://localhost:8999', // 修改为目标地址为网关服务端口
        changeOrigin: true,
        pathRewrite: {
          '^/api': '' // 将 /api 重写为空字符串
        }
      }
    }
  },
  pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'less',
      patterns: [
        path.resolve(__dirname, 'src/assets/styles/variables.less'),
        path.resolve(__dirname, 'src/assets/styles/mixins.less')
      ]
    }
  }
}